<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>index</title>
</head>
<body>
<a href="push.html" target="_blank">push</a>
<a href="pull.html" target="_blank">pull</a>

<div id="logs"></div>
</body>
</html>


<script>

    function log(msg) {
        document.getElementById('logs').innerHTML += msg + '<br>'
        console.log(msg)
    }

    window.onload = function () {

        fetch("/state").then(function (res) {
            return res.json()
        }).then(function (res) {
            log(JSON.stringify(res))
        })
    }

</script>